Skip to main content

CollectionsApi

All URIs are relative to //api.estuary.tech/

MethodHTTP requestDescription
collectionsColuuidCommitPostPOST /collections/{coluuid}/commitProduce a CID of the collection contents
collectionsColuuidContentsDeleteDELETE /collections/{coluuid}/contentsDeletes a content from a collection
collectionsColuuidDeleteDELETE /collections/{coluuid}Deletes a collection
collectionsColuuidGetGET /collections/{coluuid}Get contents in a collection
collectionsColuuidPostPOST /collections/{coluuid}Add contents to a collection
collectionsFsAddPostPOST /collections/fs/addAdd a file to a collection
collectionsGetGET /collections/List all collections
collectionsPostPOST /collections/Create a new collection

collectionsColuuidCommitPost

String collectionsColuuidCommitPost(coluuid)

Produce a CID of the collection contents

This endpoint is used to save the contents in a collection, producing a top-level CID that references all the current CIDs in the collection.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.CollectionsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

CollectionsApi apiInstance = new CollectionsApi();
String coluuid = "coluuid_example"; // String | coluuid
try {
String result = apiInstance.collectionsColuuidCommitPost(coluuid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CollectionsApi#collectionsColuuidCommitPost");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
coluuidStringcoluuid

Return type

String

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

collectionsColuuidContentsDelete

String collectionsColuuidContentsDelete(body, coluuid)

Deletes a content from a collection

This endpoint is used to delete an existing content from an existing collection. If two or more files with the same contentid exist in the collection, delete the one in the specified path

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.CollectionsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

CollectionsApi apiInstance = new CollectionsApi();
ApiDeleteContentFromCollectionBody body = new ApiDeleteContentFromCollectionBody(); // ApiDeleteContentFromCollectionBody | Variable to use when filtering for files (must be either 'path' or 'content_id')
String coluuid = "coluuid_example"; // String | Collection ID
try {
String result = apiInstance.collectionsColuuidContentsDelete(body, coluuid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CollectionsApi#collectionsColuuidContentsDelete");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
bodyApiDeleteContentFromCollectionBodyVariable to use when filtering for files (must be either 'path' or 'content_id')
coluuidStringCollection ID

Return type

String

Authorization

bearerAuth

HTTP request headers

  • Content-Type: /
  • Accept: application/json

collectionsColuuidDelete

String collectionsColuuidDelete(coluuid)

Deletes a collection

This endpoint is used to delete an existing collection.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.CollectionsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

CollectionsApi apiInstance = new CollectionsApi();
String coluuid = "coluuid_example"; // String | Collection ID
try {
String result = apiInstance.collectionsColuuidDelete(coluuid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CollectionsApi#collectionsColuuidDelete");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
coluuidStringCollection ID

Return type

String

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

collectionsColuuidGet

List<CollectionsCollectionListResponse> collectionsColuuidGet(coluuid, dir)

Get contents in a collection

This endpoint is used to get contents in a collection. If no colpath query param is passed

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.CollectionsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

CollectionsApi apiInstance = new CollectionsApi();
String coluuid = "coluuid_example"; // String | coluuid
String dir = "dir_example"; // String | Directory
try {
List<CollectionsCollectionListResponse> result = apiInstance.collectionsColuuidGet(coluuid, dir);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CollectionsApi#collectionsColuuidGet");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
coluuidStringcoluuid
dirStringDirectory[optional]

Return type

List<CollectionsCollectionListResponse>

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

collectionsColuuidPost

String collectionsColuuidPost(body, coluuid, dir, overwrite)

Add contents to a collection

This endpoint adds already-pinned contents (that have ContentIDs) to a collection.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.CollectionsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

CollectionsApi apiInstance = new CollectionsApi();
List<Integer> body = Arrays.asList(56); // List<Integer> | Content IDs to add to collection
String coluuid = "coluuid_example"; // String | Collection UUID
String dir = "dir_example"; // String | Directory
String overwrite = "overwrite_example"; // String | Overwrite conflicting files
try {
String result = apiInstance.collectionsColuuidPost(body, coluuid, dir, overwrite);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CollectionsApi#collectionsColuuidPost");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
bodyList<Integer>Content IDs to add to collection
coluuidStringCollection UUID
dirStringDirectory[optional]
overwriteStringOverwrite conflicting files[optional]

Return type

String

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

collectionsFsAddPost

String collectionsFsAddPost(coluuid, content, dir, overwrite)

Add a file to a collection

This endpoint adds a file to a collection

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.CollectionsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

CollectionsApi apiInstance = new CollectionsApi();
String coluuid = "coluuid_example"; // String | Collection ID
String content = "content_example"; // String | Content
String dir = "dir_example"; // String | Directory inside collection
String overwrite = "overwrite_example"; // String | Overwrite file if already exists in path
try {
String result = apiInstance.collectionsFsAddPost(coluuid, content, dir, overwrite);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CollectionsApi#collectionsFsAddPost");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
coluuidStringCollection ID
contentStringContent
dirStringDirectory inside collection[optional]
overwriteStringOverwrite file if already exists in path[optional]

Return type

String

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

collectionsGet

List<CollectionsCollection> collectionsGet()

List all collections

This endpoint is used to list all collections. Whenever a user logs on estuary, it will list all collections that the user has access to. This endpoint provides a way to list all collections to the user.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.CollectionsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

CollectionsApi apiInstance = new CollectionsApi();
try {
List<CollectionsCollection> result = apiInstance.collectionsGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CollectionsApi#collectionsGet");
e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<CollectionsCollection>

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

collectionsPost

CollectionsCollection collectionsPost(body)

Create a new collection

This endpoint is used to create a new collection. A collection is a representaion of a group of objects added on the estuary. This endpoint can be used to create a new collection.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.CollectionsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

CollectionsApi apiInstance = new CollectionsApi();
ApiCreateCollectionBody body = new ApiCreateCollectionBody(); // ApiCreateCollectionBody | Collection name and description
try {
CollectionsCollection result = apiInstance.collectionsPost(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CollectionsApi#collectionsPost");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
bodyApiCreateCollectionBodyCollection name and description

Return type

CollectionsCollection

Authorization

bearerAuth

HTTP request headers

  • Content-Type: /
  • Accept: application/json